package cn.com.controler.SystemState;

import cn.com.entity.SystemState;

public class SystemStateDAO {

    //停用系统
    public int endsystem(){
        String str = "update system set SystemState = 0 where SystemStateId = 1";
        Object [] arr = new Object[]{};
        return SystemStateDAOTemplete.insertdata(str,arr);
    }

    //启用系统
    public int startsystem(){
        String str = "update system set SystemState = 1 where SystemStateId = 1";
        Object [] arr = new Object[]{};
        return SystemStateDAOTemplete.insertdata(str,arr);
    }

    //查询当前状态
    public int selectState(){
        String str = "select SystemState from system where SystemStateId = 1";
        Object [] arr = new Object[]{};
        return SystemStateDAOTemplete.selectdata(str, arr);
    }
}
